'use strict'
let Koa = require('koa');
let bodyParser = require('koa-bodyparser');
let statics = require('koa-static');

let controllers = require('./controllers');
let tempMiddleWare = require('./tempMiddleWare')

let app = new Koa();

app.use(statics(__dirname+'/view'));

app.use(bodyParser());

app.use(tempMiddleWare);

app.use(controllers());

let port = 3000;

app.listen(port);

console.log(`http://localhost:${port}`);